$(function(){ var mySwiper = new Swiper('#main-page',{ direction: 'vertical', hashNavigation: true, autoHeight: true, slidesPerView :'auto', noSwiping : true, noSwipingClass : 'stop-swiping', mousewheel: {eventsTarged: '#main-page',}, speed:1000, loop:false, keyboard: {enabled: true,onlyInViewport: true,}, pagination: {el: '#main-pagination',type: 'bullets',clickable :true,renderBullet: function (index, className) { switch(index){ case 0:text='鍏充簬鎴戜滑';break; case 1:text='浜у搧涓績';break; case 2:text='宸ョ▼妗堜緥';break; case 3:text='鍏紑淇℃伅';break; case 4:text='鑱旂郴鎴戜滑';break; case 5:text='';break; } return '' + text + ''; },}, on:{ slideChange: function(){ var index=this.activeIndex if(index==3){ $('.pc-menu-left .line').css('background','#242424'); $('.pc-menu-left,.pc-menu-right,#main-pagination').addClass('on'); } else{ $('.pc-menu-left .line').css('background',''); $('.pc-menu-left,.pc-menu-right,#main-pagination').removeClass('on'); } }, }, }); mySwiper.slideTo(0, 0, false); $('#BannerShow_b1 .swiper-container').swiper({ speed:1000, autoplay:{delay:5000,stopOnLastSlide: false,disableOnInteraction: false,}, pagination_el:'#BannerShow_b1 .swiper-pagination', type: 'fraction', loop:false, effect : 'fade', fadeEffect: {crossFade: true,}, renderFraction: function (currentClass, totalClass) {return '
';}, scrollbar: {el: '#banner1-bar',} }); $('#BannerShow_b2 .swiper-container').swiper({ speed:1000, autoplay:{delay:5000,stopOnLastSlide: false,disableOnInteraction: false,}, pagination_el:'#BannerShow_b2 .swiper-pagination', type: 'fraction', loop:false, effect : 'fade', fadeEffect: {crossFade: true,}, renderFraction: function (currentClass, totalClass) {return '
';}, scrollbar: {el: '#banner2-bar',} }); var thumbsSwiper = new Swiper('#i-case-bg',{ slidesPerView: 1, effect : 'fade', noSwiping : true, pagination: { el: '#i-case-page', type: 'fraction', renderFraction: function (currentClass, totalClass) {return '';}, }, fadeEffect: {crossFade: true,}, noSwipingClass : 'swiper-slide', scrollbar: {el: '#i-case-scrollbar',}, }); var mySwiper = new Swiper('#i-case',{ speed:1000, autoplay:{delay:5000,stopOnLastSlide: false,disableOnInteraction: false,}, slidesPerView :'auto', loop:true, thumbs: { swiper: thumbsSwiper, } }); });